import '../bean/home_bean.dart';
import '../utils/api/http.dart';
import '../utils/tools/localstorage_tool.dart';

class HomeModel {
  /// ### 查询首页告警统计
  /// #### [par] Map|必填|请求参数
  static Future reqHomeAlarmInfor(Map<String, dynamic> par) async {
    String token = await LocalStorage.getStringItem("token");
    var res = await HttpManager.getInstance()
        .post("alarm/getAppAlarmStatistics?token=$token", params: par);
//    print(res);
    HomeBean newRes =
        HomeBean(res["data"]["alarmAmount"], res["data"]["value"]);
    return newRes;
  }
}
